package wrapper.exer;

import com.sun.jmx.snmp.SnmpInt;

import java.util.Scanner;
import java.util.Vector;

/**
 * Created with IntelliJ IDEA.
 * ClassName: ScoreTest
 * Package: wrapper.exer
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-11-27
 * Time: 15:35
 */

public class ScoreTest {


    public static void main(String[] args) {
        int a = 10;
    }

    public static void main1(String[] args) {

        Vector vector = new Vector();

        //从键盘获取成绩
        Scanner scanner = new Scanner(System.in);

        while (true) {

            System.out.println("请输入学生成绩------>: ");
            int next = scanner.nextInt();

            if (next < 0) {
                break;
            }

            //添加数据
            //vector.add() 参数是Object
            //自动装箱了
            vector.addElement(next);


        }

        //遍历成绩
        for (int i = 0; i < vector.size(); i++) {
            Object o = vector.elementAt(i);
//            Integer i1 = (Integer) o;
//
//            int score = i1.intValue();

            //自动拆箱
            int score = (int) o;


        }
        int a[] = {12,334};


        //计算一下最高分

        //一次获取v中的每个学生成绩与最高分进行比较 获取等级

    }

}
